home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
tlxjwpc5.zip
/
CAP2.SLT
< prev
next >
Wrap
Text File
|
1990-09-21
|
4KB
|
84 lines
//╔═════════════════════════════════════════════════════════════════════╗
//║ RBBS 17.3A JW-PC Consulting DataFlex.HST (608)837-1923 ║
//║ Dual Std HST/V.32/MNP5/V.42 RBBSnet 8:972/2 FIDOnet 1:121/8 ║
//╚═════════════════════════════════════════════════════════════════════╝
// Capture file automation macro - set this to a function key!
//
// By: James L. Wargula - JW-PC Consulting DataFlex.SIG RBBS
// (608)837-1923 BBS RBBS-Net 8:972/2
//
// Close any open capture file and open a new one based upon a unique file
// name and extension concatenated from the internal clock/calendar functions.
//
// YEAR + MONTH + DAY + HOURS = file name (8-characters)
// MINUTES + SIXTHS OF A MINUTE = file extension (3-characters)
//
// This will enable the user to create a unique name, as long as a minimum
// of 10-seconds have passed since the previous file was opened. Otherwise
// script macro will re-open existing file and append to it. Setting a
// function key = @CYC will automate calling this macro and give you
// "instant" unique capture files, within the 10-second limitation. This
// macro could be modified to exclude the decade, and include full seconds,
// thereby allowing the user a 1-second interval between files. This macro
// was written to allow archiving of continuous information that could be
// pulled off of a file server by another user after the TELIX user
// "CYCled" the capture file. In a network situation, the open capture
// file is locked by the primary user when it is open. Having the macro
// set to a function key allows the user to easily close the existing file
// and open a new one with a unique name. The unique names can easily be
// sorted sequentially due to the structure of the concatenated name. The
// file name and extension represent the "opening" date/time stamp, while
// the file time and date stamp represent the "closing" date/time.
//
main()
{
capture("*CLOSE*"); //close any open capture file.
//
str cap_dir[64]="D:\"; //Put your capture path here
// note: path must have trailing back-slash.
// Use "" (two quotes) if the default directory is preferred.
//
str cap_name[12];
str dat[8];
str tim[8];
str day[2];
str mon[2];
str yea[2];
str hrs[2];
str min[2];
str sec[1];
str message[80];
_time_format = 1;
date(curtime(),dat); //Get the string date
substr(dat,3,2,day); //Just want the day
substr(dat,0,2,mon); //Just want the month
substr(dat,6,2,yea); //Just want the year
strcat(cap_name,yea); //Add year to cap_name
strcat(cap_name,mon); //Add month to cap_name
strcat(cap_name,day); //Add day to cap_name
time(curtime(),tim); //Get the string time
substr(tim,0,2,hrs); //Just want the hours
substr(tim,3,2,min); //Just want the minutes
substr(tim,6,1,sec); //Just want the 1/6's of minutes
strcat(cap_name,hrs); //Add hrs to cap_name
strcat(cap_name,"."); //Add ext dot to cap_name
strcat(cap_name,min); //Add minutes to cap_name
strcat(cap_name,sec); //Add sixths of minutes to cap_name
strcat(cap_dir,cap_name); //Put path in front of cap_name
strupper(cap_dir); //Make it all caps
if (capture(cap_dir) == -1) //Try to open capture file,
{ //if error, construct message...
strcat(message,"ERROR in opening ");
strcat(message,cap_dir);
strcat(message," capture file.");
status_wind(message, 50); //print message
}
else
{ //if OK, construct message...
strcat(message,"Capture file ");
strcat(message,cap_dir);
strcat(message," successfully opened.");
status_wind(message, 30); //print message
}
}